package net.moonbiter.ebs.exposer;

import net.moonbiter.ebs.BusinessProvider;
import net.moonbiter.ebs.BusinessService;
import net.moonbiter.ebs.Input;

import org.apache.log4j.Logger;

@BusinessProvider("logger")
public class LoggerService {	
	private static final Logger logger = Logger.getLogger(LoggerService.class);

	@BusinessService("logMessage")
	public void logMessage(@Input(name="msg") String message){
		logger.info(message);
	}
	
	@BusinessService("logMessages")
	public void logMessage(@Input(name="msgs") String[] messages){
		for (String msg : messages){
			logMessage(msg);
		}
	}
}
